package com.huarui.company.action;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;
import org.ewaf.framework.action.BaseAction;
import org.ewaf.framework.task.Engine;
import org.ewaf.framework.task.Handler;

import com.opensymphony.xwork2.Action;


public class CertifyButtonAction extends BaseAction{

	private static final long serialVersionUID = 8498449315250457737L;
	
	@SuppressWarnings("unused")
	private static final Logger logger = Logger.getLogger(CertifyButtonAction.class);
	

	private Engine certifyButtonEngine;
	private String statusId;
	private boolean mask;
	private Map<String,Object> buttonsMap=new HashMap<String, Object>();
	
	
	public String query(){
		List<Handler> handlers = certifyButtonEngine.getHandlers(statusId);
		if(handlers == null) {
			handlers = new ArrayList<Handler>();
		}
		buttonsMap.put("buttons", handlers);
		//buttonsMap.put("mask",mask);
		return "json";
	}


	public Engine getCertifyButtonEngine() {
		return certifyButtonEngine;
	}


	public void setCertifyButtonEngine(Engine certifyButtonEngine) {
		this.certifyButtonEngine = certifyButtonEngine;
	}


	public String getStatusId() {
		return statusId;
	}


	public void setStatusId(String statusId) {
		this.statusId = statusId;
	}


	public boolean isMask() {
		return mask;
	}


	public void setMask(boolean mask) {
		this.mask = mask;
	}


	public Map<String, Object> getButtonsMap() {
		return buttonsMap;
	}


	public void setButtonsMap(Map<String, Object> buttonsMap) {
		this.buttonsMap = buttonsMap;
	}
	
	
	
}
